#coding=utf-8
'''
Created on 2017-7-10

@author: sandy
'''

import logging

class FirstLogin(object):
    
    def __init__(self):
        self.propId = 0
        self.propCount = 0
        self.propertyId = 0
        self.propertyCount = 0
        
    def onRemoteConfig(self, cfgname, jf):
        if cfgname!= u"centerconfig.firstlogin":
            return
        self.loadFromJson(jf)
            
    def loadFromJson(self, jf):
        logging.info(u"loading centerconfig.firstlogin.json")
        self.propId = jf.get("propId")
        self.propCount = jf.get("propCount")
        self.propertyId = jf.get("propertyId")
        self.propertyCount = jf.get("propertyCount")
        logging.debug("propId=%d,propCount=%d,propertyId=%d,propertyCount=%d",self.propId,self.propCount,self.propertyId,self.propertyCount)
            
    def getPropId(self):
        return self.propId

    def getPropCount(self):
        return self.propCount

    def getPropertyId(self):
        return self.propertyId

    def getPropertyCount(self):
        return self.propertyCount
    
instance = FirstLogin()

if __name__ == '__main__':
    pass